#include <sys/select.h>
#include "dfs_config.h"
#ifndef _DFS_NET
#define _DFS_NET
/* Definitions */
#define P2P_PORT 1337
#define MAX_BIND_ATTEMPTS 5
#define LISTENQUEUE 30

/* Global Variables */

/* this one holds server's ip address */
char this_address[MAXIPADDRESSLEN];

/* max file descriptor */
int fdmax;
int client_fdmax;
int p2p_fdmax;

/* master & ipc file descriptor list contains all socket & pipe descriptors */
fd_set master_list;
fd_set client_list;
fd_set p2p_list;

/* Function Prototypes */
_PROTOTYPE( void dfs_net_module,(void)										);
_PROTOTYPE( void catch_USR1_P, (int)										);
_PROTOTYPE( int socket_addr_setup_net,(int)									);
_PROTOTYPE( void p2p_accept_connection, (int)								);
_PROTOTYPE( void extract_ip_address,(char *)								);
#endif
